import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';
//import About from '../views/About.vue';
//import Foo from '../views/Foo.vue';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/data',
        name: 'BigData',
        //component: About
        component: () => import(/* webpackChunkName: "bigData" */ '../views/Bigdata.vue')
    },
    {
        path: '/about',
        name: 'About',
        //component: About
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/foo',
        name: 'Foo',
        //component: Foo
        component: () => import(/* webpackChunkName: "foo" */ '../views/Foo.vue')
    }
    // {
    //     path: '/aysnc',
    //     name: 'aysnc',
    //     component: Async
    // },
    // {
    //     path: '/aysnc2',
    //     name: 'aysnc2',
    //     component: Async2
    // },
];

const router = new VueRouter({
    routes
});

export default router;
